<HTML>
<HEAD>
<TITLE>[Chapter 23] TextAreaPeer</TITLE>
<META NAME="author" CONTENT="John Zukowski">
<META NAME="date" CONTENT="Thu Jul 31 15:28:46 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java AWT">
<META NAME="title" CONTENT="Java AWT">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java AWT" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch23_22.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 23<br>java.awt.peer Reference</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch23_24.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=refnamediv>
<H1>TextAreaPeer</H1>

<H2>Name</H2>

TextAreaPeer

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch23-REFSECT1-AUTOID.107"></A></h2>
</DIV>


<p>
<img align=middle src="./figs/textare.gif" alt="[Graphic: Figure from the text]" width=502 height=121 border=0>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch23-REFSECT1-AUTOID.108">Description</A></h2>

<P CLASS=para>
<tt CLASS=literal>TextAreaPeer</tt> is an interface 
that defines the basis for text areas. 

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch23-REFSECT1-AUTOID.109">Interface Definition</A></h2>

<DIV CLASS=screen>
<P>
<PRE>
public abstract interface java.awt.peer.TextAreaPeer
   extends java.awt.peer.TextComponentPeer {
  // Interface Methods
  public abstract Dimension getMinimumSize (int rows, int columns); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public abstract Dimension getPreferredSize (int rows, int columns); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public abstract void insert (String string, int position); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public abstract void insertText (String string, int position); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public abstract Dimension minimumSize (int rows, int columns); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public abstract Dimension preferredSize (int rows, int columns); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public abstract void replaceRange (String string, int startPosition, int endPosition); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public abstract void replaceText (String string, int startPosition, int endPosition); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
}
</PRE>
</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch23-REFSECT1-AUTOID.110">Interface Methods</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch23-REFSECT2-AUTOID.92">getMinimumSize</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch23-REFSECT3-AUTOID.93">public abstract Dimension getMinimumSize (int rows, int columns) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>rows</I><br>
<DD>

<P CLASS=para>
Number of rows within 
the text area's peer.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>columns</I><br>
<DD>

<P CLASS=para>
Number of columns 
within the text area's peer. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The minimum dimensions of a text area's peer of the given size. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch23-REFSECT2-AUTOID.93">getPreferredSize</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch23-REFSECT3-AUTOID.94">public abstract Dimension getPreferredSize (int rows, int columns) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>rows</I><br>
<DD>

<P CLASS=para>
Number of rows within 
the text area's peer.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>columns</I><br>
<DD>

<P CLASS=para>
Number of columns 
within the text area's peer. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The preferred dimensions of a text area's peer of the given size. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch23-REFSECT2-AUTOID.94">insert</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch23-REFSECT3-AUTOID.95">public abstract void insert (String string, int position) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>string</I><br>
<DD>

<P CLASS=para>
Content to place 
within the text area's peer.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>position</I><br>
<DD>

<P CLASS=para>
Location at which 
to insert the content. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Places additional text within the text area's peer. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch23-REFSECT2-AUTOID.95">insertText</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch23-REFSECT3-AUTOID.96">public abstract void insertText (String string, int position) <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>string</I><br>
<DD>

<P CLASS=para>
Content to place 
within the text area's peer.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>position</I><br>
<DD>

<P CLASS=para>
Location at which 
to insert the content. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Places additional text within the text area's peer. Replaced by <tt CLASS=literal>insert(String, 
int)</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch23-REFSECT2-AUTOID.96">minimumSize</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch23-REFSECT3-AUTOID.97">public abstract Dimension minimumSize (int rows, int columns) <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>rows</I><br>
<DD>

<P CLASS=para>
Number of rows within 
the text area's peer.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>columns</I><br>
<DD>

<P CLASS=para>
Number of columns 
within the text area's peer. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The minimum dimensions of a text area's peer of the given size. Replaced 
by <tt CLASS=literal>getMinimumSize(int, int)</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch23-REFSECT2-AUTOID.97">preferredSize</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch23-REFSECT3-AUTOID.98">public abstract Dimension preferredSize (int rows, int columns) <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>rows</I><br>
<DD>

<P CLASS=para>
Number of rows within 
the text area's peer.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>columns</I><br>
<DD>

<P CLASS=para>
Number of columns 
within the text area's peer. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The preferred dimensions of a text area's peer of the given size. 
Replaced by <tt CLASS=literal>getPreferredSize(int, int)</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch23-REFSECT2-AUTOID.98">replaceRange</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch23-REFSECT3-AUTOID.99">public abstract void replaceRange (String string, int startPosition, int endPosition) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>string</I><br>
<DD>

<P CLASS=para>
New content to place 
in the text area's peer.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>startPosition</I><br>
<DD>

<P CLASS=para>
Starting 
position of the content to replace.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>endPosition</I><br>
<DD>

<P CLASS=para>
Ending position 
of the content to replace. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Replaces a portion of the text area peer's content with the given 
text. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch23-REFSECT2-AUTOID.99">replaceText</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch23-REFSECT3-AUTOID.100">public abstract void replaceText (String string, int startPosition, int endPosition) <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>string</I><br>
<DD>

<P CLASS=para>
New content to place 
in the text area's peer.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>startPosition</I><br>
<DD>

<P CLASS=para>
Starting 
position of the content to replace.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>endPosition</I><br>
<DD>

<P CLASS=para>
Ending position 
of the content to replace. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Replaces a portion of the text area peer's content with the given 
text. Replaced by <tt CLASS=literal>replaceRange(String, int, int)</tt>. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch23-REFSECT1-AUTOID.111">See Also</A></h2>

<P CLASS=para>
<tt CLASS=literal>Dimension</tt>, <tt CLASS=literal>String</tt>, 
<tt CLASS=literal>TextComponentPeer</tt> 

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch23_22.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch23_24.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>ScrollPanePeer <img src="gifs/bstar.gif" alt="(New)" border=0></td>
<td width=171 align=center valign=top><a href="index/idx_a.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>TextComponentPeer</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
